/*
    created: 2023/4/3
    filename: Prototype.cpp
    author: 李东霖
    purpose: Prototype的演示代码

*/
#include"Prototype.h"
#include<iostream>

ConcreatePrototype1::ConcreatePrototype1()
{
    std::cout << "construction of ConcreatePrototype1\n"<<std::endl;
}
//拷贝构造
ConcreatePrototype1::ConcreatePrototype1(const ConcreatePrototype1& ref)
{
    std::cout << " copy construction of ConcreatePrototype1\n"<<std::endl;

}
ConcreatePrototype1::~ConcreatePrototype1()
{
    std::cout << "destruction of ConcreatePrototype1\n"<<std::endl;
}

Prototype* ConcreatePrototype1::Clone()
{
    return new ConcreatePrototype1(*this);
}


ConcreatePrototype2::ConcreatePrototype2()
{
     std::cout << "construction of ConcreatePrototype2\n"<<std::endl;   
}
//拷贝构造
ConcreatePrototype2::ConcreatePrototype2(const ConcreatePrototype2&)
{
   std::cout << " copy construction of ConcreatePrototype2\n"<<std::endl; 

}
ConcreatePrototype2::~ConcreatePrototype2()
{
    std::cout << "destruction of ConcreatePrototype2\n"<<std::endl;
}

Prototype* ConcreatePrototype2::Clone()
{
    return new ConcreatePrototype2(*this);
}



















